package cn.doitedu.utils;

import org.apache.commons.lang3.time.DateUtils;

import java.util.Calendar;
import java.util.Date;

public class TimeBoundUtils {

    public static Long getTimeBound(long timeStamp, int hour) {
        Date dt = DateUtils.ceiling(new Date(timeStamp), Calendar.HOUR);
        return dt.getTime() - 1000 * 60 * 60 * hour;
    }
}
